<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class RemoveEntityStepIndexInTaskTable extends AbstractMigration
{

    public function up()
    {
        $this->table('task')->removeIndexByName('idx_entity_id_step_id')->removeIndexByName('idx_tenant_module_project')->save();
    }

    public function down()
    {
        $this->table('task')->addIndex(['entity_id', 'step_id'], ['name' => 'idx_entity_id_step_id'])
            ->addIndex(['tenant_id', 'entity_module_id', 'project_id'], ['name' => 'idx_tenant_module_project'])
            ->save();
    }
}
